<script  >

import Child from "./Child.vue";
export default {
  components:{
    Child
  },
  methods:{
    handleClick(){
      console.log("click")
    }
  }
}
</script>

<template>

  <div>
    <div>父</div>
    <child style="background: gray"  @click="handleClick" message="hi"></child> <!-- click函数会传递 -->
  </div>
</template>

<style scoped>

</style>